﻿/*
 * Copyright (c) 2000-2015 Tacke Consulting, Inc
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 
 * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions 
 * of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 * 
 */
using System;

using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace OpenNETCF.Media.DirectShow
{
    /// <summary>The IEnumFilters interface enumerates the filters in a filter graph.</summary>
    [ComImport]
    [Guid("56A86893-0AD4-11CE-B03A-0020AF0BA770")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    internal interface IEnumFilters
    {
        /// <summary>The Next method retrieves the specified number of filters in the enumeration sequence.</summary>
        /// <param name="cFilters">Number of filters to retrieve.</param>
        /// <param name="ppFilter">Array of size cFilters that is filled with IBaseFilter interface pointers.</param>
        /// <param name="pcFetched">Pointer to a variable that receives the number of filters retrieved.</param>
        /// <remarks>Should always be called with cFilters set to 1.</remarks>
        [PreserveSig]
        int Next([In] uint cFilters, [Out] out IBaseFilter ppFilter, [Out] out uint pcFetched);

        /// <summary>The Skip method skips over a specified number of filters.</summary>
        /// <param name="cFilter">Number of filters to skip.</param>
        void Skip([In] uint cFilter);

        /// <summary>Resets the enumeration sequence to the beginning.</summary>
        void Reset();

        /// <summary>
        /// The Clone method makes a copy of the enumerator object. The returned object starts with the 
        /// same enumeration state as the original.
        /// </summary>
        /// <param name="ppEnum">Address of a variable that receives a pointer to the IEnumFilters interface of the new enumerator.</param>
        void Clone([Out] out IEnumFilters ppEnum);
    }
}
